Skip to content

Remove VirtualNetwork from (most of) card API#5349

Draft
backspace wants to merge 2 commits into
mainfrom
cs-11450-remove-vn-threading-card-api-store
Draft

Remove VirtualNetwork from (most of) card API#5349
backspace wants to merge 2 commits into
mainfrom
cs-11450-remove-vn-threading-card-api-store

Conversation

@backspace

@backspace backspace commented Jun 26, 2026

Copy link
Copy Markdown
Contributor

Now that the runtime works with RRIs, virtual networks shouldn’t be needed in the card API. This removes most of them, but excludes pills and query fields, which await #5356.

@github-actions

github-actions Bot commented Jun 26, 2026

Copy link
Copy Markdown
Contributor

Preview deployments

Host Test Results

    1 files  ± 0      1 suites  ±0   2h 13m 28s ⏱️ + 6m 18s
3 319 tests +47  3 304 ✅ +47  15 💤 ±0  0 ❌ ±0 
3 338 runs  +47  3 323 ✅ +47  15 💤 ±0  0 ❌ ±0 

Results for commit cc4d2a3. ± Comparison against earlier commit 674b39c.

Realm Server Test Results

    1 files  ±0      1 suites  ±0   10m 7s ⏱️ +52s
1 670 tests +7  1 670 ✅ +7  0 💤 ±0  0 ❌ ±0 
1 749 runs  +7  1 749 ✅ +7  0 💤 ±0  0 ❌ ±0 

Results for commit cc4d2a3. ± Comparison against earlier commit 674b39c.

…and serialize paths

Identifiers are canonical RRI inside the runtime, so the form-bridging that
was threaded through these interior paths is no longer needed:

- resolveRef resolves relative references with pure RRI path math (new
  resolveRRIReference in url.ts); no VirtualNetwork.
- isLocalId is a pure syntactic test (not a URL, not an @-prefix).
- SerializeOpts no longer carries a VirtualNetwork; the serialize path
  (card-serialization.ts, serializers/code-ref.ts) preserves prefix-form refs
  and resolves URL-form refs with plain URL math.

The host Store's asURL keeps resolving keys to normalized URL form (via the
VN) so it stays consistent with gc-card-store, which keys instances by their
URL-form data.id. Collapsing the store's canonical key to an opaque RRI token
is deferred to CS-11730 — it needs gc-card-store keyed the same way and must
preserve the URL normalization toURL provides.

VirtualNetwork stays where it resolves an RRI to a real URL at the network
boundary (document loading), at render-time pill resolution, and for the
Store's URL-form keying.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@backspace backspace force-pushed the cs-11450-remove-vn-threading-card-api-store branch from 6516d9e to 674b39c Compare June 26, 2026 21:24
…reading-card-api-store

# Conflicts:
#	packages/base/card-api.gts
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant